# ECE 454 Spring 2008 Assignment 1
# Macaranas, Joseph jjmacara
# Turner, Travis t2turner
# Makefile
# REPLACE sampleServer, sampleServer2, sampleClient, sampleClient2 objects with 
# the server and client objects to be used for execution.
CC	= g++
CFLAGS	= -g
CXXFLAGS= -g -DDEBUG
#LIBS    = -lc -lbind -lnis -llocal

default:	librpc.a binder sampleServer sampleServer2 sampleClient sampleClient2

clean:
	rm -f *.o sampleServer sampleServer2 sampleClient sampleClient2 binder *~ librpc.a

NSOBJS = sampleServer.o 

NSOBJS2 = sampleServer2.o 

CLIOBJS = sampleClient.o

CLIOBJS2 = sampleClient2.o

BINOBJS = binder.o

LIBS = -lrpc -lnsl -lsocket -lresolv -lpthread

librpc.a: serverstub.o clientstub.o
	ar -r librpc.a serverstub.o clientstub.o

sampleServer:	$(NSOBJS) librpc.a
	$(CC) -o $@ $(CFLAGS) $(NSOBJS) $(LIBS) -L.
	
sampleServer2:	$(NSOBJS2) librpc.a
	$(CC) -o $@ $(CFLAGS) $(NSOBJS2) $(LIBS) -L.

sampleClient:	$(CLIOBJS) librpc.a
	$(CC) -o $@ $(CFLAGS) $(CLIOBJS) $(LIBS) -L.

sampleClient2:	$(CLIOBJS2) librpc.a
	$(CC) -o $@ $(CFLAGS) $(CLIOBJS2) $(LIBS) -L.

binder:	$(BINOBJS)
	$(CC) -o $@ $(CFLAGS) $(BINOBJS) $(LIBS)  -L.

